﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiGradientBackgroundTraitsData : OdGiBackgroundTraitsData
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiGradientBackgroundTraitsData(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiGradientBackgroundTraitsData obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiGradientBackgroundTraitsData()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiGradientBackgroundTraitsData(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGiGradientBackgroundTraitsData() : this(GlobalsPINVOKE.new_OdGiGradientBackgroundTraitsData(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmEntityColor colorTop()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_colorTop(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setColorTop(OdCmEntityColor color)
		{
			GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_setColorTop(this.swigCPtr, OdCmEntityColor.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmEntityColor colorMiddle()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_colorMiddle(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setColorMiddle(OdCmEntityColor color)
		{
			GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_setColorMiddle(this.swigCPtr, OdCmEntityColor.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmEntityColor colorBottom()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_colorBottom(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setColorBottom(OdCmEntityColor color)
		{
			GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_setColorBottom(this.swigCPtr, OdCmEntityColor.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double horizon()
		{
			double result = GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_horizon(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double height()
		{
			double result = GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_height(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double rotation()
		{
			double result = GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_rotation(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setHorizon(double value)
		{
			GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_setHorizon(this.swigCPtr, value);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setHeight(double value)
		{
			GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_setHeight(this.swigCPtr, value);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setRotation(double value)
		{
			GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_setRotation(this.swigCPtr, value);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool IsEqual(OdGiGradientBackgroundTraitsData data2)
		{
			bool result = GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_IsEqual(this.swigCPtr, OdGiGradientBackgroundTraitsData.getCPtr(data2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdGiGradientBackgroundTraitsData data2)
		{
			bool result = GlobalsPINVOKE.OdGiGradientBackgroundTraitsData_IsNotEqual(this.swigCPtr, OdGiGradientBackgroundTraitsData.getCPtr(data2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
